AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )

function ENT:Initialize()
	self.Entity:SetModel( "models/weapons/glueblob.mdl" )
	self.Entity:SetSkin( 1 )
	self.Entity:PhysicsInit( SOLID_VPHYSICS )
	self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
	self.Entity:SetSolid( SOLID_VPHYSICS )
	self.Entity:SetCollisionGroup(COLLISION_GROUP_WEAPON)
	local phys = self.Entity:GetPhysicsObject()
	if (phys:IsValid()) then
		phys:Wake()
	end
	self.Trail = util.SpriteTrail(self, 0, Color(50,50,250,250), false, 8, 1, 0.50, 1/32 * 0.5, "trails/plasma.vmt")
end

function ENT:PhysicsCollide( data, physobj )
	if data.HitEntity:IsWorld() then
		self.Entity:SetVar( "HitNormal", data.HitNormal )
		self.Entity:SetMoveType( MOVETYPE_NONE )
	end
end

function ENT:Think( )
	if not self.Thrower:Alive() then
		self.Entity:Remove()
	end
end

function ENT:OnTakeDamage( dmg )

end

function ENT:Explode( )
	StickyBomb_Explosion(self.Thrower,self.Entity:GetPos(),self.Entity,math.Rand( 75, 95 ),192,1)
	self.Entity:Remove()
end

function ENT:OnRemove( )
end
